//
//  PartyFeeTableViewCell.m
//  UESTCPioneer
//
//  Created by Apple on 14-7-2.
//  Copyright (c) 2014年 Sway. All rights reserved.
//

#import "PartyFeeTableViewCell.h"

@implementation PartyFeeTableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        CGFloat y = (self.frame.size.height - 30)/2;
        
        self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, y, 80, 30)];
        self.nameLabel.tag = 0;
        [self.contentView addSubview:self.nameLabel ];
        self.contentLabel = [[UILabel alloc] initWithFrame:CGRectMake(100, y, self.frame.size.width - 100 -10, 30)];
        self.contentLabel.textAlignment = NSTextAlignmentRight;
        self.contentLabel.tag = 1;
        [self.contentView addSubview:self.contentLabel];
        self.contentTextField = [[UITextField alloc] initWithFrame:CGRectMake(100, y, self.frame.size.width - 100 -10, 30)];
        self.contentTextField.tag = 2;
        [self.contentView addSubview:self.contentTextField];
        self.contentTextField.enabled = NO;
//        self.btn = [[UIButton alloc] initWithFrame:CGRectMake(10, 0, self.frame.size.width - 20, 2)];
//        self.
        
    }
    return self;
}

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)setSeparatorEnable{
   
    UIButton * button1 = [[UIButton alloc] initWithFrame:CGRectMake(10, 10, self.frame.size.width - 20, 1)];
    [button1 setImage:[UIImage imageNamed:@"sepline.png"] forState:UIControlStateNormal];
    
    UIButton * button2 = [[UIButton alloc] initWithFrame:CGRectMake(10, self.frame.size.height - 1, self.frame.size.width - 20, 1)];
    [button2 setImage:[UIImage imageNamed:@"sepline.png"] forState:UIControlStateNormal];
    
    [self.contentView addSubview:button1];
    [self.contentView addSubview:button2];

}
@end
